Skip to content

fix(build): add workaround for building on stackblitz - #22840

Merged
sapphi-red merged 2 commits into
mainfrom
fix/build-on-stackblitz
Jul 9, 2026
Merged

sapphi-red merged 2 commits into
mainfrom
fix/build-on-stackblitz

Conversation

@sapphi-red

Copy link
Copy Markdown
Member

When building on stackblitz, the import.meta.resolve in the output was replaced with a slightly different value (𝐢𝐦𝐩𝐨𝐫𝐭.meta.resolve).
https://stackblitz.com/edit/vitejs-vite-yuazbcvz?file=index.html&terminal=build
This causes ReferenceError: 𝐢𝐦𝐩𝐨𝐫𝐭 is not defined error.

This is caused by how stackblitz works and the way we use function.toString(): https://stackblitz.com/edit/node-vqfvv8dy?file=index.js

This PR adds a workaround for that.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat: build p3-minor-bug An edge case that only affects very specific usage (priority) trigger: preview

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant